home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / SHARE / prog / POVRAY / SPRAY.ZIP / FIREWRKS.POV next >
Encoding:
Text File  |  1997-05-23  |  2.3 KB  |  71 lines

  1. // LIQID SPRAY: FIREWORKS ANIMATION
  2. // ********************************
  3. // This animation shows how the spray_start and spray_stop options
  4. // can be used to turn on and off spray objects.
  5.  
  6. // CAMERA AND LIGHTS
  7.    camera {location <0, 1, -4> look_at <0, .5, 0> angle 45}
  8.    light_source {<0, 20, -4> rgb 1}
  9.  
  10. // BACKGROUND
  11.    sky_sphere {pigment {gradient y
  12.       color_map {[0 rgb <.1, 0, .2>] [1 rgb <0, 0, 0>]}
  13.       rotate x * 10}}
  14.  
  15. // SEA
  16.    box {<-2, -.1, -2>, <2, 0, 0>
  17.       pigment {rgb <0, .1, .2>}
  18.       normal {bozo .03 scale <.3, .1, .1> phase clock triangle_wave}
  19.       finish {reflection .5 phong .2 phong_size 1}}
  20.  
  21. // CITY
  22.    union {
  23.       box {<-2, 0, -.1>, <2, .1, .1>}
  24.       #declare R1 = seed(5)
  25.       #declare Count = -2 #while (Count < 2)
  26.          #declare Width = .2 + rand(R1) * .2
  27.          box {<0, 0, 0>, <.8, 1, .1>
  28.          scale <Width, .3 + rand(R1) * .6, 1>
  29.          translate x * Count}
  30.       #declare Count = Count + Width #end
  31.       pigment {rgb <0, 0, 0>}}
  32.  
  33. // SPRAY OPTIONS
  34.    #declare spray_gravity = 13
  35.    #declare nozzle_angle = 150
  36.    #declare particle_count = 200
  37.    #declare particle_life = .3
  38.    #declare particle_size = .1
  39.    #declare particle_stretch = 6
  40.    #declare spray_turb = .2
  41.    #declare spin_turb = 5
  42.    #declare evaporate = .7
  43.    #declare spray_texture = texture {pigment {rgb <1, 1, 0>} finish {ambient 1 diffuse .5}}
  44.  
  45. // FIRST SPRAY
  46.    #declare spray_start = 0
  47.    #declare spray_stop = .1
  48.    #declare spray_location = <.2, 1.3, 2>
  49.    #declare spray_direction = <1, 4, -5>
  50.    #declare spray_strength = 4
  51.    #declare spray_color_map = color_map {[0 rgb <1, 1, .3>] [1 rgb <.3, 0, 0>]}
  52.    #include "Spray.inc"
  53.  
  54. // SECOND SPRAY
  55.    #declare spray_start = .3
  56.    #declare spray_stop = .4
  57.    #declare spray_location = <-1.2, 1, 2>
  58.    #declare spray_direction = <-1, 2, -4>
  59.    #declare spray_strength = 4.5
  60.    #declare spray_color_map = color_map {[0 rgb <.3, .6, 1>] [1 rgb <0, 0, .3>]}
  61.    #include "Spray.inc"
  62.  
  63. // THIRD SPRAY
  64.    #declare spray_start = .6
  65.    #declare spray_stop = .7
  66.    #declare spray_location = <1.1, .7, 2>
  67.    #declare spray_direction = <0, 3, -4>
  68.    #declare spray_strength = 3
  69.    #declare spray_color_map = color_map {[0 rgb <1, .6, 1>] [1 rgb <.3, 0, .3>]}
  70.    #include "Spray.inc"
  71.